import 'package:find_friend/pages/mine/model/followmodel.dart';

class HotSearchResponse {
  String msg;
  Data data;

  HotSearchResponse({this.msg, this.data});

  HotSearchResponse.fromJson(Map<String, dynamic> json) {
    msg = json['msg'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['msg'] = this.msg;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    return data;
  }
}

class Data {
  List<String> hot;
  List<FollowModel> user;

  Data({this.hot, this.user});

  Data.fromJson(Map<String, dynamic> json) {
    hot = json['hot'].cast<String>();
    if (json['user'] != null) {
      user = new List<FollowModel>();
      json['user'].forEach((v) {
        user.add(new FollowModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['hot'] = this.hot;
    if (this.user != null) {
      data['user'] = this.user.map((v) => v.toJson()).toList();
    }
    return data;
  }
}